package com.gosophia.conference.action.summary;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.conferenceManagement.summary.dto.SendSummaryJobDataDTO;
import com.gosophia.conferenceManagement.summary.ws.SendSummaryWebService;

@Scope("prototype")
@Controller("GetSendSummaryDetailAction")
public class GetSendSummaryDetailAction extends BaseSupportAction{

    private static final long serialVersionUID = 1L;

    private SendSummaryJobDataDTO sendSummaryJobDataDTO;
    @Autowired
    private SendSummaryWebService sendSummaryWebService;
    
    //在线文档在仓库中的路径
    private String onlinePath;
    //在线文档版本
    private String onlineVersion;
    //设置文档为不可编辑
    private String onlineIsEdit = "unEdit";
    
    private Long jobId;
    
    @Override
    public String _execute() throws Exception {
        sendSummaryJobDataDTO = sendSummaryWebService.findSendSummaryJobDataByJobDataId(jobId);
        
        if(sendSummaryJobDataDTO!=null && sendSummaryJobDataDTO.getOnlineDocumentDTO()!=null){
            onlinePath = sendSummaryJobDataDTO.getOnlineDocumentDTO().getDocumentPath();
            onlineVersion= sendSummaryJobDataDTO.getOnlineDocumentDTO().getDocumentVersion();
        }
        
        return SUCCESS;
    }
    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public String getOnlinePath() {
        return onlinePath;
    }

    public void setOnlinePath(String onlinePath) {
        this.onlinePath = onlinePath;
    }

    public String getOnlineVersion() {
        return onlineVersion;
    }

    public void setOnlineVersion(String onlineVersion) {
        this.onlineVersion = onlineVersion;
    }

    public String getOnlineIsEdit() {
        return onlineIsEdit;
    }

    public void setOnlineIsEdit(String onlineIsEdit) {
        this.onlineIsEdit = onlineIsEdit;
    }

    public SendSummaryJobDataDTO getSendSummaryJobDataDTO() {
        return sendSummaryJobDataDTO;
    }

    public void setSendSummaryJobDataDTO(SendSummaryJobDataDTO sendSummaryJobDataDTO) {
        this.sendSummaryJobDataDTO = sendSummaryJobDataDTO;
    }
    
}
